import request from '@/utils/request'

// 查询商家促销活动列表
export function listSellerStorePromotionActivity(query) {
  return request({
    url: '/seller/sellerStorePromotionActivity/list',
    method: 'get',
    params: query
  })
}

// 查询商家促销活动详细
export function getSellerStorePromotionActivity(activityId) {
  return request({
    url: '/seller/sellerStorePromotionActivity/' + activityId,
    method: 'get'
  })
}

// 新增商家促销活动
export function addSellerStorePromotionActivity(data) {
  return request({
    url: '/seller/sellerStorePromotionActivity',
    method: 'post',
    data: data
  })
}

// 修改商家促销活动
export function updateSellerStorePromotionActivity(data) {
  return request({
    url: '/seller/sellerStorePromotionActivity',
    method: 'put',
    data: data
  })
}

// 删除商家促销活动
export function delSellerStorePromotionActivity(activityId) {
  return request({
    url: '/seller/sellerStorePromotionActivity/' + activityId,
    method: 'delete'
  })
}

// 发布活动到速卖通
export function createActivityToAe(query) {
  return request({
    url: '/ae/promotionActivity/createActivityToAe',
    method: 'get',
    params: query
  })
}
